package de.fhkl.strokeprotocol.messages;

/**
 * Message that indicates that the sender wants to login with the user
 * credentials contained in this message.
 */
public class LoginMessage implements IMessage
{
	private static final long serialVersionUID = -8271138802363554328L;

	/** Email address */
	private String mEmail;

	/** Password */
	private String mPassword;

	/** User type */
	private char mType;

	/**
	 * Message that indicates that the sender wants to login with the user
	 * credentials contained in this message.
	 * 
	 * @param email
	 * @param password
	 * @param type
	 */
	public LoginMessage(String email, String password, char type)
	{
		mEmail = email;
		mPassword = password;
		mType = type;
	}

	/**
	 * Returns the users email.
	 * 
	 * @return
	 */
	public String getEmail()
	{
		return mEmail;
	}

	/**
	 * Sets the users Email.
	 * 
	 * @param email
	 */
	public void setEmail(String email)
	{
		mEmail = email;
	}

	/**
	 * Returns the users password.
	 * 
	 * @return
	 */
	public String getPassword()
	{
		return mPassword;
	}

	/**
	 * Sets the users password.
	 * 
	 * @param password
	 */
	public void setPassword(String password)
	{
		mPassword = password;
	}

	/**
	 * Returns the user type the sender wants to log in as.
	 * 
	 * @return
	 */
	public char getType()
	{
		return mType;
	}

	/**
	 * Sets the user type the sender wants to log in as.
	 * 
	 * @param type
	 */
	public void setType(char type)
	{
		mType = type;
	}
}
